From 7f0d30a0cc2666c442d2fafd2b708db72077de08 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 22 Dec 2006 16:13:49 +0000 Subject: [PATCH] Check for getc_unlocked. 2006-12-22 Matthias Clasen * configure.in: Check for getc_unlocked. * gtk/xdgmime/xdgmimemagic.c: Use getc if getc_unlocked is unavailable. (#381499) --- ChangeLog | 5 +++++ configure.in | 2 +- gtk/xdgmime/xdgmimemagic.c | 4 ++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a3d5672489..cde103b9e0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,9 @@ 2006-12-22 Matthias Clasen + + * configure.in: Check for getc_unlocked. + + * gtk/xdgmime/xdgmimemagic.c: Use getc if getc_unlocked is + unavailable. (#381499) * tests/teststatusicon.c: Fix a typo diff --git a/configure.in b/configure.in index 2e85607193..9d0aa2653d 100644 --- a/configure.in +++ b/configure.in @@ -398,7 +398,7 @@ if test "x$enable_rebuilds" = "xyes" && \ fi AC_SUBST(REBUILD) -AC_CHECK_FUNCS(lstat mkstemp flockfile) +AC_CHECK_FUNCS(lstat mkstemp flockfile getc_unlocked) # _NL_TIME_FIRST_WEEKDAY is an enum and not a define AC_MSG_CHECKING([for _NL_TIME_FIRST_WEEKDAY]) diff --git a/gtk/xdgmime/xdgmimemagic.c b/gtk/xdgmime/xdgmimemagic.c index 8258b2bb1b..6088edb276 100644 --- a/gtk/xdgmime/xdgmimemagic.c +++ b/gtk/xdgmime/xdgmimemagic.c @@ -47,6 +47,10 @@ #define TRUE (!FALSE) #endif +#if !defined getc_unlocked && !defined HAVE_GETC_UNLOCKED +# define getc_unlocked(fp) getc (fp) +#endif + typedef struct XdgMimeMagicMatch XdgMimeMagicMatch; typedef struct XdgMimeMagicMatchlet XdgMimeMagicMatchlet; -- 2.30.2